import request from '@/utils/request'

//分页查询
export function pageList(data) {
  return request({
    url: '/warningOrderDept/page.do',
    method: 'post',
    data,
  })
}


//分页查询(我的协同任务)
export function pageListById(data) {
  return request({
    url: '/warningOrderDept/pageById.do',
    method: 'post',
    data,
  })
}

//警令类型
export function selectWarningTypeList(data) {
  return request({
    url: '/warningOrderDept/selectWarningTypeList.do',
    method: 'post',
    data,
  })
}
//保存
export function saveWOD(data) {
  return request({
    url: '/warningOrderDept/save.do',
    method: 'post',
    data,
    headers: {
      'Content-Type': 'multipart/form-data'
    },
  })
}


//提交反馈
export function submitSave(data) {
  return request({
    url: '/warningOrderDept/submitSave.do',
    method: 'post',
    data,
  })
}


//详情
export function detalisWOD(data) {
  return request({
    url: '/warningOrderDept/detalis.do',
    method: 'post',
    data,
  })
}

//文件下载
export function download(data) {
  return request({
    url: '/file/downloadFile.do',
    method: 'post',
    data,
    responseType: 'blob'
  })
}

//协同反馈督察排行
export function getRanking(data) {
  return request({
    url: '/warningOrderDept/getRanking.do',
    method: 'post',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'      //改这里就好了
    },
    data,
  })
}

//添加指派人
export function addAssignerId(data) {
  return request({
    url: '/warningOrderDept/addAssignerId.do',
    method: 'post',
    data,
  })
}

//已读
export function readOne(data) {
  return request({
    url: '/warningOrderDept/readOne.do',
    method: 'post',
    data,
  })
}